Syntax Highlight in Publish Examples
ChenZhijin
.com

Syntax Highlight in Publish Examples

Syntax Highlight in Publish Examples

Made with SwiftPygmentsPublishPlugin

Read more about SwiftPygmentsPublishPlugin in this article: SwiftPygments Plugin for Publish

Swift

1
2
3
4
5
var i = 1
print(i)
func test(i:Int) {
print(i * 2)
}

Python

1
2
import numpy as np
np.linspace(0, 100, 101)

Treat as Swift

1
2
3
4
5
var i = 1
print(i)
func test(i:Int) {
print(i * 2)
}

LaTeX

1
2
3
4
5
6
7
8
\documentclass[12pt]{article}

\begin{document}
Hello World!
\begin{equation}
\mathrm{G}_{0}={\frac {2e^{2}}{h}} \approx 7.748\times10^{−5}~\mathrm{S}
\end{equation}
\end{document}

Tagged with: